package com.oocl.batchdatav2.comparator;

import java.util.Comparator;

import com.oocl.batchdatav2.pojo.Customer;

public class BirthdayComparator implements Comparator<Customer> {

	public int compare(Customer c1, Customer c2) {
		int birthdayCompareTo = c1.getBirthday().compareTo(c2.getBirthday());
		if (birthdayCompareTo != 0) {
			return birthdayCompareTo;
		}
		return c1.getId() - c2.getId();
	}

}